<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<?php
include "conn.php";
$num = $_POST['txtnumber'];
$pirce = $_POST['txtprice'];
$name = $_POST['txtname'];
$gz = $_POST['txtspec'];
$sccs = $_POST['txtproducer'];
$id = $_GET['id'];
$update = mysqli_query($conn, "update shop set name='$name',spec='$gz', number='$num',price='$pirce',producer='$sccs' where id=$id");
if ($update) {
	echo "<script>alert('修改成功!');window.location.href='index.php'</script>";
} else {
	echo "<script>alert('修改失败!');window.location.href='index.php?'</script>";
}
?>
</body>
</html>